package com.example.demo.entity;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 重点企业产值 工具类
 */
@Data
public class MinKeyEnterprisesProduct {
    /**
     * 相同的个数
     */
    private Integer count;

    /**
     * 总本期当月
     */
    private double totalCurrentMonth;

    /**
     *总本期累计
     */
    private double totalCurrentAccumulate;

    /**
     *总同期累计
     */
    private double totalPreviousAccumulate;

    /**
     * 添加
     */
    public void add(KeyEnterprisesProduct keyEnterprisesProduct) {
        this.count++;
        this.totalCurrentMonth += keyEnterprisesProduct.getCurrentMonth();
        this.totalCurrentAccumulate += keyEnterprisesProduct.getCurrentAccumulate();
        this.totalPreviousAccumulate += keyEnterprisesProduct.getPreviousAccumulate();
    }

    public MinKeyEnterprisesProduct() {
        this.count = 0;
    }
}
